package com.jd.jr.insights.dm.dim.domain;


import com.alibaba.fastjson.annotation.JSONField;
import com.jd.jr.insights.dm.dim.util.TreeNode;

import java.util.Date;

public class Rule extends TreeNode {

    /*记录ID*/
    public Integer id;
    /*规则编码*/
    public String code;
    /*规则值*/
    public String value;
    /*规则描述*/
    public String desc;
    /*规则类型*/
    public String type;
    /*是否有效*/
    public Integer    is_valid;
    /*创建时间*/
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public Date created_time;
    /*更新时间*/
    @JSONField (format="yyyy-MM-dd HH:mm:ss")
    public Date updated_time;


    public Rule(){

    }
    public Rule(Integer id,String code,String value,String desc,String type,int is_valid,Date created_time,Date updated_time){
        setId(id);
        setCode(code);
        setValue(value);
        setDesc(desc);
        setType(type);
        setIs_valid(is_valid);
        setCreated_time(created_time);
        setUpdated_time(updated_time);
        ;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }



    public void setIs_valid(Integer is_valid) {
        this.is_valid = is_valid;
    }

    public Date getCreated_time() {
        return created_time;
    }

    public void setCreated_time(Date created_time) {
        this.created_time = created_time;
    }

    public Date getUpdated_time() {
        return updated_time;
    }

    public void setUpdated_time(Date updated_time) {
        this.updated_time = updated_time;
    }

    public enum Type {
        BUZ(1,"业务大类");
        ;
        private String name;
        private Type(int code,String name){
            this.code=code;
            this.name=name;
        }

        private int code;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }


    }

}
